// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CoreStoreGroup generated by hbm2java
 */
@Entity
@Table(name = "core_store_group", catalog = "magento")
public class CoreStoreGroup implements java.io.Serializable {

	private Short groupId;
	private CoreWebsite coreWebsite;
	private String name;
	private int rootCategoryId;
	private short defaultStoreId;
	private Set coreStores = new HashSet(0);

	public CoreStoreGroup() {
	}

	public CoreStoreGroup(CoreWebsite coreWebsite, String name,
			int rootCategoryId, short defaultStoreId) {
		this.coreWebsite = coreWebsite;
		this.name = name;
		this.rootCategoryId = rootCategoryId;
		this.defaultStoreId = defaultStoreId;
	}

	public CoreStoreGroup(CoreWebsite coreWebsite, String name,
			int rootCategoryId, short defaultStoreId, Set coreStores) {
		this.coreWebsite = coreWebsite;
		this.name = name;
		this.rootCategoryId = rootCategoryId;
		this.defaultStoreId = defaultStoreId;
		this.coreStores = coreStores;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "group_id", unique = true, nullable = false)
	public Short getGroupId() {
		return this.groupId;
	}

	public void setGroupId(Short groupId) {
		this.groupId = groupId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "website_id", nullable = false)
	public CoreWebsite getCoreWebsite() {
		return this.coreWebsite;
	}

	public void setCoreWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "root_category_id", nullable = false)
	public int getRootCategoryId() {
		return this.rootCategoryId;
	}

	public void setRootCategoryId(int rootCategoryId) {
		this.rootCategoryId = rootCategoryId;
	}

	@Column(name = "default_store_id", nullable = false)
	public short getDefaultStoreId() {
		return this.defaultStoreId;
	}

	public void setDefaultStoreId(short defaultStoreId) {
		this.defaultStoreId = defaultStoreId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "coreStoreGroup")
	public Set getCoreStores() {
		return this.coreStores;
	}

	public void setCoreStores(Set coreStores) {
		this.coreStores = coreStores;
	}

}
